﻿<%@ Page Language="C#" MasterPageFile="~/LoginTemplate.master" AutoEventWireup="true"
    CodeFile="Login.aspx.cs" Inherits="Login"
     Title="Crux - Login" EnableEventValidation="false" %>
<%--
    EnableEventValidation turned off becuase of an issue with Ajax 1.0 which is needed
    for ad-hoc reporting. Will need to remove this once ad-hoc reporting is fixed 
    purely for security reasons.  
--%>

<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="crux" %>
<%@ Register Src="Controls/Common/WaterMarkedTextBox.ascx" TagName="WaterMarkedTextBox"
    TagPrefix="crux" %>
<%@ Register src="Controls/Common/Calendar/CalendarScriptManager.ascx" tagname="CalendarScriptManager" tagprefix="uc1" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
    <asp:UpdatePanel ID="updatePanelLogin" runat="server">
        <ContentTemplate>
            <table cellpadding="0" cellspacing="0" class="loginTable">
                <tr>
                    <td align="center" valign="top" class="loginBorderWhite">
                        <center>
                            <table cellpadding="0" cellspacing="0" width="80%">
                                <tr>
                                    <td colspan="2" style="height: 26px;">
                                    </td>
                                </tr>
                                <tr>
                                    <td align="left" colspan="2" class="loginTxtBold">
                                        LOGIN
                                    </td>
                                </tr>
                                <tr>
                                    <td colspan="2" style="height: 12px;">
                                    </td>
                                </tr>
                                <tr>
                                    <td align="right" style="width: 50%;">
                                        <asp:Label runat="server" ID="lblUserName" Text="User Name:" CssClass="loginLabel" />
                                    </td>
                                    <!-- CreativeTODO: Add readable watermark to the password field as per the technique -->
                                    <!-- Described in the following link -->
                                    <!-- http://forums.asp.net/p/1069447/1556026.aspx -->
                                    <td align="left" style="width: 50%;">
                                        <crux:WaterMarkedTextBox ID="txtUserName" runat="server" WaterMarkText="Enter Your UserName Here" Width="180" MaxLength="200" 
                                        ErrorText="Username is required. This is usually your primary email address. Please enter a valid email address to Login."
                                            CheckEmailFormat="true"
                                            ValueRequired="true" />
                                    </td>
                                </tr>
                                <tr>
                                    <td colspan="2" style="height: 6px;">
                                    </td>
                                </tr>
                                <tr>
                                    <td align="right">
                                        <asp:Label runat="server" ID="lblPassword" Text="Password:" CssClass="loginLabel" />
                                    </td>
                                    <td align="left">
                                        <crux:WaterMarkedTextBox ID="txtPassword" runat="server" WaterMarkText="Password" Width="180" MaxLength="200" TextMode="Password" ErrorText="Password is required. We can't log you in with an empty password!"
                                            ValueRequired="true" />
                                    </td>
                                </tr>
                                <tr>
                                    <td colspan="2" style="height: 12px;">
                                    </td>
                                </tr>
                                <tr>
                                    <td>
                                    </td>
                                    <td align="left">
                                        <asp:Button ID="btnLogin" runat="server" Text="Login" OnClick="btnLogin_Click" />&nbsp;&nbsp;<input type="reset" value="Cancel" class="buttonStyle" /></td>
                                </tr>
                                <tr>
                                    <td colspan="2" style="height: 26px;">
                                    </td>
                                </tr>
                            </table>
                        </center>
                    </td>
                </tr>
            </table>
            <asp:Panel runat="server" ID="pnlAccessDenied" Visible="false">
                <table border="0" cellpadding="2" cellspacing="2" class="calloutStyle">
                    <tr>
                        <td colspan="2" style="height: 5px;">
                        </td>
                    </tr>
                    <tr>
                        <td align="right" valign="middle">
                            <img src="appimages/invalid.gif" alt="" />
                        </td>
                        <td align="left" valign="middle">
                            Invalid user name and password!
                        </td>
                    </tr>
                </table>
            </asp:Panel>
        </ContentTemplate>
    </asp:UpdatePanel>
</asp:Content>
